
abstract class Animal {
    public abstract String cry();
    public abstract String getAnimalName();
}

class Dog extends Animal {
    @Override
    public String cry() {
        return "Woof!";
    }

    @Override
    public String getAnimalName() {
        return "Dog";
    }
}

class Cat extends Animal {
    @Override
    public String cry() {
        return "Meow!";
    }

    @Override
    public String getAnimalName() {
        return "Cat";
    }
}

class Simulator {
    public void playSound(Animal animal) {
        System.out.println("Animal: " + animal.getAnimalName() + " makes sound: " + animal.cry());
    }
}
class Application {
    public static void main(String[] args) {
        Simulator simulator = new Simulator();
        simulator.playSound(new Dog());
        simulator.playSound(new Cat());
    }
}